const {data}=require('./src/mock/index')
const bodyParser =require('body-parser')

module.exports={
    devServer:{
        before:app=>{
            app.use(bodyParser.json())
            app.post('/api/list',(req,res)=>{
                const {pageIndex,pageSize}=req.body
                // let newdata=data.slice(pageIndex,pageSize)
                // console.log(data.slice(156/4))
                res.send({
                    code:200,
                    data:data
                })
            })
        }
    }
}